s="hello word";

print(s[0])
print(s[-2])

# 切片写法
# 变量名[起始索引:结束索引+1:步数]
print(s[2:5])

print(s[0:9:2])
# 字符翻转
print(s[::-1])
